import java.util.HashMap;
import java.util.Map;

/**
 * @Author ZhangCuirong
 * @Date 2025/9/16 13:48
 * @description:
 */
public class Solution459 {
    public boolean repeatedSubstringPattern(String s) {
        String str = s + s;
        return  str.substring(1, str.length()-1).contains(s);
    }

    public static void main(String[] args) {
        Solution459 solution = new Solution459();
        System.out.println(solution.repeatedSubstringPattern("ababba"));
    }
}
